package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HatchetLimitRuleMapper;
import com.ruoyi.system.domain.HatchetLimitRule;
import com.ruoyi.system.service.IHatchetLimitRuleService;
import com.ruoyi.common.support.Convert;

/**
 * 通道商户限额 服务层实现
 * 
 * @author ruoyi
 * @date 2019-03-25
 */
@Service
public class HatchetLimitRuleServiceImpl implements IHatchetLimitRuleService 
{
	@Autowired
	private HatchetLimitRuleMapper hatchetLimitRuleMapper;

	/**
     * 查询通道商户限额信息
     * 
     * @param iD 通道商户限额ID
     * @return 通道商户限额信息
     */
    @Override
	public HatchetLimitRule selectHatchetLimitRuleById(String iD)
	{
	    return hatchetLimitRuleMapper.selectHatchetLimitRuleById(iD);
	}
	
	/**
     * 查询通道商户限额列表
     * 
     * @param hatchetLimitRule 通道商户限额信息
     * @return 通道商户限额集合
     */
	@Override
	public List<HatchetLimitRule> selectHatchetLimitRuleList(HatchetLimitRule hatchetLimitRule)
	{
	    return hatchetLimitRuleMapper.selectHatchetLimitRuleList(hatchetLimitRule);
	}
	
    /**
     * 新增通道商户限额
     * 
     * @param hatchetLimitRule 通道商户限额信息
     * @return 结果
     */
	@Override
	public int insertHatchetLimitRule(HatchetLimitRule hatchetLimitRule)
	{
	    return hatchetLimitRuleMapper.insertHatchetLimitRule(hatchetLimitRule);
	}
	
	/**
     * 修改通道商户限额
     * 
     * @param hatchetLimitRule 通道商户限额信息
     * @return 结果
     */
	@Override
	public int updateHatchetLimitRule(HatchetLimitRule hatchetLimitRule)
	{
	    return hatchetLimitRuleMapper.updateHatchetLimitRule(hatchetLimitRule);
	}

	/**
     * 删除通道商户限额对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteHatchetLimitRuleByIds(String ids)
	{
		return hatchetLimitRuleMapper.deleteHatchetLimitRuleByIds(Convert.toStrArray(ids));
	}
	
}
